Documents for PDF .NET Edition
GrapeCity.Documents.Pdf Assembly / GrapeCity.Documents.Pdf.Spec Namespace / IPdfDictHolderExt Class / GetEnum Method / GetEnum<T>(IPdfDictHolder,String,T) Method
The current PDF dictionary holder.
The key of the value to get.
The default value.

In This Topic
    GetEnum<T>(IPdfDictHolder,String,T) Method
    In This Topic
    Gets the enum value associated with the specified key (in a PDF enum values should be represented by PDF names).

    Gets defValue if the value does not exist or cannot be converted to T.

    Adds a warning to GrapeCity.Documents.Pdf.GcPdfDocument.ParserLog if the value exists but cannot be converted to T.
    Syntax
    'Declaration
     
    Public Overloads Shared Function GetEnum(Of T As {New, Struct})( _
       ByVal pdh As IPdfDictHolder, _
       ByVal key As System.String, _
       ByVal defValue As T _
    ) As T
    public static T GetEnum<T>( 
       IPdfDictHolder pdh,
       System.string key,
       T defValue
    )
    where T: new(), struct

    Parameters

    pdh
    The current PDF dictionary holder.
    key
    The key of the value to get.
    defValue
    The default value.

    Type Parameters

    T

    Return Value

    The value associated with the specified key.
    See Also